<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="author" content="dc" />
    <title>内训合同</title>
    <link rel="icon" href="favicon.ico" type="images/ico" />
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css" />
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css" />
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css" />
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" />
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css" />
    <link rel="stylesheet" type="text/css" href="/css/daterangepicker.css" />
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" href="/css/bootstrapValidator.min.css" />
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css" />
    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" href="/css/internalTrainingManager/follow.css">
    <link rel="stylesheet" href="/css/workOrderManager/userTrainingAdd.css">
</head>
<body>
<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-sm-12">
            <div class="card">
                <div class="card-header">
                    <h1>内训合同</h1>
                </div>
                <div class="card-body">
                    <input type="hidden" th:value="${trainingId}" id="trainingId">
                    <form action="" class="form-horizontal" id="formTrain">

                        <div class="row total-distance" >
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <div class="form-group row" >
                                    <label class="control-label label-required label-train" >客户名称</label>
                                    <div class="form-content col-sm-8">

                                        <select class="form-control" id="customerName" name="customerName" type="text" title="请选择" data-live-search="true" onchange="contactChange()">

                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="clearfix"></div>

                            <div class="distance-contacts reset-clear" style="margin-top: 10px;">
                                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" >
                                    <div class="form-group row" >
                                        <label class="control-label label-required label-train ">联系人</label>
                                        <div class="form-content  col-sm-8">

                                            <select class="form-control" id="contactName" name="contactName" type="text" title="请选择" data-live-search="true" onchange="contactPhones()" >

                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" >
                                    <div class="form-group row" >
                                        <label class="control-label label-required col-sm-4">联系方式</label>
                                        <div class="form-content col-sm-8">

                                            <input type="text" id="contactDetails" name="contactDetails" class="form-control" placeholder="请输入">
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <div class="clearfix"></div>


                            <div class="distance-method  reset-clear" >
                                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" >
                                    <div class="form-group row" >
                                        <label class="control-label label-required label-train">电子邮箱</label>
                                        <div class="form-content  col-sm-8">
                                            <input type="text" id="customerEmail" name="customerEmail" class="form-control" placeholder="请输入">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12" >
                                    <div class="form-group row" >
                                        <label class="control-label label-required col-sm-4">合同有效起止日期</label>
                                        <div class="form-content col-sm-8">

                                            <input type="text" id="creatTm" name="creatTm" class="form-control" placeholder="请输入">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <div class="train-margin10">
                                <p>
                                    <button type="button" class="btn btn-success btn-label" data-target="#productModal" data-toggle="modal">
                                        <label><i class="mdi mdi-plus"></i></label>新增产品</button>
                                </p>
                                <table id="productList"></table>
                            </div>



                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 distance-method" style="margin-top: 20px;">
                                <div class="form-group row" >
<!--                                    label-required-->
                                    <label class="control-label  label-train" >应收金额</label>
                                    <div class="form-content col-sm-8">


                                        <span class="form-control" id="productMoney" style="border: none;"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="clearfix"></div>

                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12 distance-method">
                                <div class="file-group form-group">
<!--                                    label-required-->
                                    <label class="control-label ">合同附件</label>

                                    <div class="file-box train-margin10" >
                                        <input type="hidden" id="contractPic" class="image-id" >
                                        <input type="file"  id="contractImg" name="contractImg" class="form-control"  onchange="uploadImg('contractImg')">

                                    </div>

                                </div>
                            </div>

                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 distance-method">
                                <div class="file-group form-group">
<!--                                    label-required-->
                                    <label class="control-label ">合同备注</label>
                                    <div class="train-margin10" >
                                        <textarea class="form-control" id="contractNotes" name="contractNotes" rows="6" placeholder="请输入"></textarea>
                                    </div>


                                </div>
                            </div>

                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 distance-btn" style="">
                                <div class="pull-right">
                                    <button type="button" class="btn btn-default" onclick="resetTrain()">重置</button>
                                    <button type="button" class="btn btn-primary" onclick="submitTrain()">确认</button>
                                </div>

                            </div>



                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="productModal"  data-keyboard="false" tabindex="-1" aria-labelledby="productModal" aria-hidden="true" >
    <div class="modal-dialog" style="width: 50%">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" >新增产品</h5>
            </div>
            <form id="addProductForm" class="add-product" autocomplete="off">
                <div class="modal-body" >

                    <div class="row" style="padding: 0 20px;box-sizing: border-box">

                        <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <label class="control-label label-required" >产品名称</label>
                            <div class="form-content">
                                <input id="productName" name="productName" type="text" class="form-control" placeholder="请输入"  data-live-search="true">
                            </div>
                        </div>

                        <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <label class="control-label label-required" >价格</label>
                            <div class="form-content">
                                <input id="productPrice" name="productPrice" type="text" class="form-control" placeholder="请输入"  data-live-search="true">
                            </div>
                        </div>

                    </div>

                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary" onclick="addTrainingProduct()">确定 </button>
                        <button type="button" class="btn btn-secondary"  data-dismiss="modal" onclick="cancelTrain()">取消</button>
                    </div>

                </div>
            </form>
        </div>

    </div>

</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>


<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>

<!--时间选择插件-->
<!--公共js-->
<script src="/js/crm/common/common.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script type="text/javascript" src="/js/crm/common/dataRangePicker.min.js"></script>

<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrapValidator.min.js"></script>

<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<!--  -->

<script src="/js/crm/trainingManager/user/userTrainingAdd.js"></script>
</html>